package com.zz.springboot.processor.bag.strategy;

import com.zz.springboot.anno.StrategyKeywords;
import com.zz.springboot.anno.StrategyType;
import com.zz.springboot.constant.TypeConstants;
import com.zz.springboot.initializer.NumDictRunner;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 解析大小、单双组合策略
 */
@Component
@StrategyType("bigLittleOddsEvens")
@StrategyKeywords({"大单", "大双", "小单", "小双"})
public class BagBlOeStrategy implements BagStrategy{
    @Override
    public List<Integer> parseNum(String Key) {
        return NumDictRunner.getBigLittle_oddsEvens_combination_Map().get(Key);
    }

    @Override
    public String getKey(String data) {
        for (String target : TypeConstants.bigLittleOddsEvensConstant) {
            if (data.contains(target)) return target;
        }
        return "";
    }
}
